package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.common.BasePageInfo;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.common.CommonData;
import com.cskaoyan.bean.vo.WxFootPrintVo;
import com.cskaoyan.service.WxFootPrintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author : qj
 * @since: 2022/10/14  21:38
 */
@RestController
@RequestMapping("wx/footprint")
public class WxFootPrintController {
    @Autowired
    WxFootPrintService wxFootPrintService;

    @GetMapping("list")
    public BaseRespVo list(BasePageInfo basePageInfo){
        CommonData<WxFootPrintVo> commonData=wxFootPrintService.queryFootPrintByTypeLimit(basePageInfo);
        return BaseRespVo.ok(commonData,"成功");
    }

    @PostMapping("delete")
    public BaseRespVo delete(@RequestBody Map<String,Integer> map){
        wxFootPrintService.deleteById(map.get("id"));
        return BaseRespVo.ok();
    }

}
